home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / BLBVSVR.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.1 KB  |  72 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #ifndef __BCPLUSPLUS__
  11. #pragma inline
  12. #endif
  13.  
  14. #include "fli.h"
  15.  
  16. #ifdef __BCPLUSPLUS__
  17. #pragma hdrstop
  18. #endif
  19.  
  20. #define I asm
  21.  
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23. //
  24. // BlockCopyVisualToVirtual()
  25. //
  26. // Copys a region from the visual to virtual screen
  27. //
  28. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  29.  
  30. void BlazeClass::BlockCopyVisualToVirtual(int X,int Y,int Width,int Height,
  31.   void far *VIRTUAL)
  32. {
  33.   if (Width<1 || Height<1)
  34.     return;
  35.  
  36.   int ScreenWidth = BlazeClass::QuickWidth;
  37.  
  38.   I push ds
  39.  
  40.   void far *OUTPUT=BlazeClass::VIDEO;
  41.   I les di,VIRTUAL
  42.   I lds si,OUTPUT
  43.  
  44.   _DX = ((Y*ScreenWidth)+(X*2));
  45.   _SI += _DX;
  46.   _DI += _DX;
  47.  
  48.   I mov bx,[Width]
  49.   I mov dx,[Height]
  50.  
  51.   I cld
  52.  
  53. looped:
  54.  
  55.   I push si
  56.   I push di
  57.   I mov cx,bx
  58.  
  59.   I rep movsw
  60.  
  61.   I pop di
  62.   I pop si
  63.   I add si,ScreenWidth
  64.   I add di,ScreenWidth
  65.   I dec dx
  66.   I or dx,dx
  67.   I jne looped
  68.  
  69.   I pop ds
  70. }
  71.  
  72.